/*****************************************************************************************
   
   Copyright (c) Microsoft Corporation. All rights reserved.

   Use of this code sample is subject to the terms of the Microsoft
   Permissive License, a copy of which should always be distributed with
   this file.  You can also access a copy of this license agreement at:
   http://www.microsoft.com/resources/sharedsource/licensingbasics/permissivelicense.mspx

 ****************************************************************************************/

using System;

namespace GrooveWebServicesV12Helpers
{
	/// <summary>
	/// An abstract base class used for classes in the helper library.
	/// </summary>
	public abstract class GrooveWebServicesV12HelpersBase : IBindServices
	{
		private string m_Name;
		
		private GrooveWebServicesV12Helpers.Context m_Context;
		
		protected string m_URI;
		protected string m_IdentityURL;
		protected string m_BindableURL;

		protected object m_UserData;

		public GrooveWebServicesV12HelpersBase(string i_Name, string i_URI, string i_IdentityURL, GrooveWebServicesV12Helpers.Context i_Context)
		{
			m_Name = i_Name;
			m_URI = i_URI;
			m_IdentityURL = i_IdentityURL;
			m_Context = i_Context;
		}

		public virtual string Name
		{
			get
			{
				return m_Name;
			}

			set
			{
				throw new System.Exception("Can't set Name for this object type!");
			}
		}

		public string URI
		{
			get
			{
				return m_URI;
			}
		}

		public string IdentityURL
		{
			get
			{
				return m_IdentityURL;
			}
		}

		public GrooveWebServicesV12Helpers.Context Context
		{
			get
			{
				return m_Context;
			}
		}

		public object UserData
		{
			get
			{
				return m_UserData;
			}
			set
			{
				m_UserData = value;
			}
		}

		#region IBindServices Members

		public virtual object BindToObject(ref string[] i_URLParts, int i_URLPartIndex)
		{
			return null;
		}

		public virtual string BindableURL
		{
			get
			{
				return null;
			}
		}

		#endregion
	}
}
